/*
 *  start.S 
 *  very simple code for ARM 7TDMI 
 *
 *  author: SU Hang 
 *  date:   2004-08-28 
 */
 	

#define MODE_USR 0x10
#define MODE_IRQ 0x12
#define MODE_SVC 0x13
#define IBIT_DISABLE 0xc0

.text
	.align 4
	.global begin
	.type begin, function

begin:
    mov     r0, #IBIT_DISABLE | MODE_IRQ
    msr     cpsr, r0
    ldr     sp, =_irq_stack

    mov     r0, #IBIT_DISABLE | MODE_SVC
    msr     cpsr, r0
	ldr	    sp, =_stack_begin

	bl	    entry
	b	    stop
			
stop:
    b stop

.data
	.align  4

